diff --git a/plugin/IMDbScrape/.gitignore b/plugin/IMDbScrape/.gitignore
deleted file mode 100644
index 06361c9de..000000000
--- a/plugin/IMDbScrape/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.idea/
-cache/*
-!cache/.gitkeep
-cast/*
-!cast/not-found.jpg
-posters/*
-!posters/not-found.jpg
-vendor/
diff --git a/plugin/IMDbScrape/IMDbScrape.php b/plugin/IMDbScrape/IMDbScrape.php
deleted file mode 100644
index 5d9a2a826..000000000
--- a/plugin/IMDbScrape/IMDbScrape.php
+++ /dev/null
@@ -1,67 +0,0 @@
-Your Video title must match with IMDb title
Help";
- }
-
- public function getName() {
- return "IMDbScrape";
- }
-
- public function getUUID() {
- return "21171156-dc62-46e3-ace9-86c6e8f9c81b";
- }
-
- public function getPluginVersion() {
- return "1.0";
- }
-
- public function getVideosManagerListButton() {
- global $global;
- $btn = '
';
- $btn .= '
';
- $btn .= '
';
- $btn .= '
';
- $btn .= '
';
- return $btn;
- }
-
-
- public function getEmptyDataObject() {
- global $global;
- $obj = new stdClass();
- $obj->posterWidth = 186;
- $obj->posterHeight = 279;
- $obj->encodeTrailerInWebm = false;
- return $obj;
- }
-
- public function getFooterCode() {
- global $global;
- if (basename($_SERVER["SCRIPT_FILENAME"]) === 'managerVideos.php') {
- include $global['systemRootPath'] . 'plugin/IMDbScrape/footer.php';
- }
- }
-
-}
diff --git a/plugin/IMDbScrape/cache/.gitkeep b/plugin/IMDbScrape/cache/.gitkeep
deleted file mode 100644
index e1664421e..000000000
--- a/plugin/IMDbScrape/cache/.gitkeep
+++ /dev/null
@@ -1 +0,0 @@
-.gitkeep
diff --git a/plugin/IMDbScrape/cast/not-found.jpg b/plugin/IMDbScrape/cast/not-found.jpg
deleted file mode 100644
index 302d25336..000000000
Binary files a/plugin/IMDbScrape/cast/not-found.jpg and /dev/null differ
diff --git a/plugin/IMDbScrape/footer.php b/plugin/IMDbScrape/footer.php
deleted file mode 100644
index 842d0dbdd..000000000
--- a/plugin/IMDbScrape/footer.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
\ No newline at end of file
diff --git a/plugin/IMDbScrape/get.json.php b/plugin/IMDbScrape/get.json.php
deleted file mode 100644
index e60ca9b67..000000000
--- a/plugin/IMDbScrape/get.json.php
+++ /dev/null
@@ -1,68 +0,0 @@
-error = true;
-$obj->msg = "";
-
-if (!User::isAdmin() && !Video::canEdit($_GET['videos_id'])) {
- $obj->msg = "You cant do this";
- die(json_encode($obj));
-}
-
-$video = new Video('', '', $_GET['videos_id']);
-
-$oIMDB = new IMDB($video->getTitle());
-if ($oIMDB->isReady) {
- $videoFileName = $video->getFilename();
-
- if (empty($_GET['what']) || $_GET['what'] == 1) {
- // get poster
- $poster = $oIMDB->getPoster('big', true);
-
- $filename = Video::getPathToFile("{$videoFileName}_portrait.jpg");
- im_resizeV2($poster, $filename, $plugin->posterWidth, $plugin->posterHeight);
- }
-
- if (empty($_GET['what']) || $_GET['what'] == 2) {
- // get description
- $description = $oIMDB->getDescription();
- $video->setDescription($description);
- }
-
- if (empty($_GET['what']) || $_GET['what'] == 3) {
- // get rate
- $rate = $oIMDB->getRating();
- $video->setRate($rate);
- }
-
- if (empty($_GET['what']) || $_GET['what'] == 4) {
- $encodeTrailerInWebm = intval($plugin->encodeTrailerInWebm);
- // trailer
- $trailer = $oIMDB->getTrailerAsUrl(true);
- $encoderURL = $config->getEncoderURL() . "youtubeDl.json?webm={$encodeTrailerInWebm}&videoURL=" . urlencode($trailer) . "&webSiteRootURL=" . urlencode($global['webSiteRootURL']) . "&user=" . urlencode(User::getUserName()) . "&pass=" . urlencode(User::getUserPass());
- _error_log("IMDB encoder URL {$encoderURL}");
- $json = url_get_contents($encoderURL);
- _error_log("IMDB encoder answer {$json}");
- $json = _json_decode($json);
- if (!empty($json->videos_id)) {
- $trailerVideo = new Video('', '', $json->videos_id);
- $trailerVideo->setStatus('u');
- $video->setTrailer1(Video::getPermaLink($json->videos_id, true));
- }
- }
- $video->save();
-
- $obj->error = false;
-} else {
- $obj->msg = "Movie not found";
-}
-
-echo json_encode($obj);
diff --git a/plugin/IMDbScrape/imdb.class.php b/plugin/IMDbScrape/imdb.class.php
deleted file mode 100644
index 38a5c544d..000000000
--- a/plugin/IMDbScrape/imdb.class.php
+++ /dev/null
@@ -1,1684 +0,0 @@
-
- * @license https://opensource.org/licenses/MIT The MIT License
- * @link https://github.com/FabianBeiner/PHP-IMDB-Grabber/ GitHub Repository
- * @version 6.1.4
- */
-class IMDB
-{
- /**
- * Set this to true if you run into problems.
- */
- const IMDB_DEBUG = false;
-
- /**
- * Set the preferred language for the User Agent.
- */
- const IMDB_LANG = 'en-US,en;q=0.9';
-
- /**
- * Define the timeout for cURL requests.
- */
- const IMDB_TIMEOUT = 15;
-
- /**
- * These are the regular expressions used to extract the data.
- * If you don’t know what you’re doing, you shouldn’t touch them.
- */
- const IMDB_AKA = '~
(.+)
~Ui'; - const IMDB_PLOT_KEYWORDS = '~Using redirect: ' . basename($sRedirectFile) . ''; - } - $sRedirect = file_get_contents($sRedirectFile); - $this->sUrl = trim($sRedirect); - $this->iId = preg_replace('~[\D]~', '', IMDBHelper::matchRegex($sRedirect, self::IMDB_ID, 1)); - $bSearch = false; - } - } - - // Does a cache of this movie exist? - $sCacheFile = $this->sRoot . '/cache/' . sha1($this->iId) . '.cache'; - if (is_readable($sCacheFile)) { - $iDiff = round(abs(time() - filemtime($sCacheFile)) / 60); - if ($iDiff < $this->iCache) { - if (true === self::IMDB_DEBUG) { - echo '
Using cache: ' . basename($sCacheFile) . ''; - } - $this->sSource = file_get_contents($sCacheFile); - $this->isReady = true; - - return true; - } - } - - // Run cURL on the URL. - if (true === self::IMDB_DEBUG) { - echo '
Running cURL: ' . $this->sUrl . ''; - } - - $aCurlInfo = IMDBHelper::runCurl($this->sUrl); - $sSource = $aCurlInfo['contents']; - - if (false === $sSource) { - if (true === self::IMDB_DEBUG) { - echo '
cURL error: ' . var_dump($aCurlInfo) . ''; - } - - return false; - } - - // Was the movie found? - $sMatch = IMDBHelper::matchRegex($sSource, self::IMDB_SEARCH, 1); - if (false !== $sMatch) { - $sUrl = 'https://www.imdb.com/title/' . $sMatch . '/reference'; - if (true === self::IMDB_DEBUG) { - echo '
New redirect saved: ' . basename($sRedirectFile) . ' => ' . $sUrl . ''; - } - file_put_contents($sRedirectFile, $sUrl); - $this->sSource = null; - self::fetchUrl($sUrl); - - return true; - } - $sMatch = IMDBHelper::matchRegex($sSource, self::IMDB_NOT_FOUND, 0); - if (false !== $sMatch) { - if (true === self::IMDB_DEBUG) { - echo '
Movie not found: ' . $sSearch . ''; - } - - return false; - } - - $this->sSource = str_replace([ - "\n", - "\r\n", - "\r" - ], - '', - $sSource); - $this->isReady = true; - - // Save cache. - if (false === $bSearch) { - if (true === self::IMDB_DEBUG) { - echo '
Cache created: ' . basename($sCacheFile) . ''; - } - file_put_contents($sCacheFile, $this->sSource); - } - - return true; - } - - /** - * @return array All data. - */ - public function getAll() - { - $aData = []; - foreach (get_class_methods(__CLASS__) as $method) { - if (substr($method, 0, 3) === 'get' && $method !== 'getAll' && $method !== 'getCastImages') { - $aData[$method] = [ - 'name' => ltrim($method, 'get'), - 'value' => $this->{$method}() - ]; - } - } - array_multisort($aData); - - return $aData; - } - - /** - * @return string “Also Known As” or $sNotFound. - */ - public function getAka() - { - if (true === $this->isReady) { - $sMatch = IMDBHelper::matchRegex($this->sSource, self::IMDB_AKA, 1); - if (false !== $sMatch) { - return IMDBHelper::cleanString($sMatch); - } - } - - return self::$sNotFound; - } - - /** - * Returns all local names - * - * @return string All local names. - */ - public function getAkas() - { - if (true === $this->isReady) { - // Does a cache of this movie exist? - $sCacheFile = $this->sRoot . '/cache/' . sha1($this->iId) . '_akas.cache'; - $bUseCache = false; - - if (is_readable($sCacheFile)) { - $iDiff = round(abs(time() - filemtime($sCacheFile)) / 60); - if ($iDiff < $this->iCache || false) { - $bUseCache = true; - } - } - - if ($bUseCache) { - $aRawReturn = file_get_contents($sCacheFile); - $aReturn = unserialize($aRawReturn); - - return IMDBHelper::arrayOutput($this->bArrayOutput, $this->sSeparator, self::$sNotFound, $aReturn); - } else { - $fullAkas = sprintf('https://www.imdb.com/title/tt%s/releaseinfo', $this->iId); - $aCurlInfo = IMDBHelper::runCurl($fullAkas); - $sSource = $aCurlInfo['contents']; - - if (false === $sSource) { - if (true === self::IMDB_DEBUG) { - echo '
cURL error: ' . var_dump($aCurlInfo) . ''; - } - - return false; - } - - $aReturned = IMDBHelper::matchRegex($sSource, "~
cURL error: ' . var_dump($aCurlInfo) . ''; - } - - return false; - } - - $aReturned = - IMDBHelper::matchRegex($sSource, '~>(.*)<\/a><\/td>\s+
cURL returned wrong HTTP code “' . $aCurlInfo['http_code'] . '”, aborting.'; - } - - return false; - } - - return $aCurlInfo; - } - - /** - * @param string $sUrl The URL to the image to download. - * @param int $cId The cast ID of the actor. - * - * @return string Local path. - */ - public static function saveImageCast($sUrl, $cId) - { - if ( ! preg_match('~http~', $sUrl)) { - return 'cast/not-found.jpg'; - } - - $sFilename = dirname(__FILE__) . '/cast/' . $cId . '.jpg'; - if (file_exists($sFilename)) { - return 'cast/' . $cId . '.jpg'; - } - - $aCurlInfo = self::runCurl($sUrl, true); - $sData = $aCurlInfo['contents']; - if (false === $sData) { - return 'cast/not-found.jpg'; - } - - $oFile = fopen($sFilename, 'x'); - fwrite($oFile, $sData); - fclose($oFile); - - return 'cast/' . $cId . '.jpg'; - } -} diff --git a/plugin/IMDbScrape/posters/not-found.jpg b/plugin/IMDbScrape/posters/not-found.jpg deleted file mode 100644 index 60dbbee78..000000000 Binary files a/plugin/IMDbScrape/posters/not-found.jpg and /dev/null differ diff --git a/plugin/ShareSocialButtonsOnEmbed/ShareSocialButtonsOnEmbed.php b/plugin/ShareSocialButtonsOnEmbed/ShareSocialButtonsOnEmbed.php deleted file mode 100644 index f670afd30..000000000 --- a/plugin/ShareSocialButtonsOnEmbed/ShareSocialButtonsOnEmbed.php +++ /dev/null @@ -1,34 +0,0 @@ -(Deprecated, will be removed next version) Enable Or disable Share Social Buttons on Embed videos"; - } - - public function getName() { - return "ShareSocialButtonsOnEmbed"; - } - - public function getUUID() { - return "c63ae9e3-bf01-4f76-9d7e-b3ad7fd92e3e"; - } - - public function getFooterCode() { - global $global, $video, $isEmbed; - if(empty($isEmbed)){ - return ""; - } - include 'script.php'; - } -} diff --git a/plugin/ShareSocialButtonsOnEmbed/script.php b/plugin/ShareSocialButtonsOnEmbed/script.php deleted file mode 100644 index 74bba397d..000000000 --- a/plugin/ShareSocialButtonsOnEmbed/script.php +++ /dev/null @@ -1,140 +0,0 @@ - - - \ No newline at end of file diff --git a/plugin/YouTube/YouTube.php b/plugin/YouTube/YouTube.php deleted file mode 100644 index ba2b03fa2..000000000 --- a/plugin/YouTube/YouTube.php +++ /dev/null @@ -1,123 +0,0 @@ -(Deprecated, will be removed in next version) Make the first page works as a YouTube"; - } - - public function getName() { - return "YouTube"; - } - - public function getUUID() { - return "youu05bf-3570-4b1f-977a-fd0e5cabtube"; - } - - public function getPluginVersion() { - return "1.0"; - } - - public function getHeadCode() { - global $global, $sidebarStyle; - $obj = $this->getDataObject(); - // preload image - $js = ""; - $css = ''; - if(!empty($obj->playVideoOnFullscreen) && !empty($_GET['videoName'])){ - $css .= ''; - } - if(!empty($obj->playVideoOnFullscreen)){ - $css .= ''; - } - - $sidebarStyle = ($this->menuIsOpen())?"/**/":"display: none;"; - - return $js.$css; - } - public function getEmptyDataObject() { - global $global; - $obj = new stdClass(); - - $obj->hidePrivateVideos = false; - $obj->BigVideo = true; - $obj->Description = false; - $obj->CategoryDescription = false; - $obj->Trending = true; - $obj->TrendingCustomTitle = ""; - $obj->TrendingRowCount = 12; - $obj->DateAdded = true; - $obj->DateAddedCustomTitle = ""; - $obj->DateAddedRowCount = 12; - $obj->MostWatched = true; - $obj->MostWatchedCustomTitle = ""; - $obj->MostWatchedRowCount = 12; - $obj->MostPopular = true; - $obj->MostPopularCustomTitle = ""; - $obj->MostPopularRowCount = 12; - $obj->SortByName = false; - $obj->SortByNameCustomTitle = ""; - $obj->SortByNameRowCount = 12; - $obj->SubscribedChannels = true; - $obj->SubscribedChannelsRowCount = 12; - $obj->Categories = false; - $obj->CategoriesRowCount = 12; - $obj->sortReverseable = false; - $obj->SubCategorys = false; - $obj->showTags = true; - $obj->searchOnChannels = true; - $obj->searchOnChannelsRowCount = 12; - $obj->playVideoOnFullscreen = false; - $obj->playVideoOnBrowserFullscreen = false; - $obj->filterUserChannel = false; - return $obj; - } - - public function getHelp(){ - if(User::isAdmin()){ - return "
| Option-name | Default | Description |
|---|---|---|
| BigVideo | checked | Create a big preview with a direct description on top |
| DateAdded,MostPopular,MostWatched,SortByName | checked,checked,checked,unchecked | Metacategories |
| SubCategorys | unchecked | Enable a view for subcategories on top |
| Description | unchecked | Enable a small button for show the description |